import React, { Component } from 'react'
import { Route, Switch } from 'react-router-dom'
import Home from '../pages/Home'
import Shop from '../pages/Shop'
import Account from '../pages/Account'
import Menu from '../pages/Menu'

export default class index extends Component {
  render() {
    return (
      <div>
        <Switch>
          {/* exact 严格匹配  / 如果不加  所有带/xxx 都被匹配为/了 */}
          <Route path="/" exact component={Home}></Route>
          <Route path="/shop" component={Shop}></Route>

          <Route path="/account" component={Account}></Route>
          <Route path="/menu" component={Menu}></Route>
        </Switch>
        <div style={{ height: 100 }}></div>
      </div>
    )
  }
}
